return null;
return { 'id': resultId,
'name': app.get_name(),
- 'icon': app.create_icon_texture(Search.RESULT_ICON_SIZE)};
+ 'createIcon': function(size) {
+ return app.create_icon_texture(size);
+ }
+ };
},
activateResult: function(id, params) {
return null;
return { 'id': resultId,
'name': docInfo.name,
- 'icon': docInfo.createIcon(Search.RESULT_ICON_SIZE)};
+ 'createIcon': function(size) {
+ return docInfo.createIcon(size);
+ }
+ };
},
activateResult: function(id, params) {
return null;
return { 'id': resultId,
'name': placeInfo.name,
- 'icon': placeInfo.iconFactory(Search.RESULT_ICON_SIZE) };
+ 'createIcon': function(size) {
+ return placeInfo.iconFactory(size);
+ }
+ };
},
activateResult: function(id, params) {
const DISABLED_OPEN_SEARCH_PROVIDERS_KEY = 'disabled-open-search-providers';
-const RESULT_ICON_SIZE = 48;
-
// Not currently referenced by the search API, but
// this enumeration can be useful for provider
// implementations.
* getResultInfo:
* @id: Result identifier string
*
- * Return an object with 'id', 'name', (both strings) and 'icon' (Clutter.Texture)
- * properties which describe the given search result.
+ * Return an object with 'id', 'name', (both strings) and 'createIcon'
+ * (function(size) returning a Clutter.Texture) properties which describe
+ * the given search result.
*/
getResultMeta: function(id) {
throw new Error('Not implemented');
reactive: true,
track_hover: true });
let icon = new IconGrid.BaseIcon(this.metaInfo['name'],
- { createIcon: Lang.bind(this, function(size) {
- return this.metaInfo['icon'];
- })});
+ { createIcon: this.metaInfo['createIcon'] });
content.set_child(icon.actor);
}
this._content = content;